﻿@model Domain.Entity.Review

@{
    ViewBag.Title = "ReviewSummary";
}

<div id="titlelessItem">
    <div class = "item">
        <h2>@Html.ActionLink(Model.Name, "ReviewInfo", "Review", new {id = Model.Id}, null)</h2>
        By @Html.ActionLink(@Model.Account.Username, "ViewAccount", "Account", new { id = @Model.Account.Username }, null)<br/>
        Posted on @Model.PostedDate<br/>
        @Model.Summary<br/>
        
        @if(Model.Account.Username == User.Identity.Name || User.IsInRole("Moderator") || User.IsInRole("Admin"))
        {
            <div id="buttonList"  style="text-align: right">
                    @Html.ActionLink("Delete", "DeleteReview", "Review", new { id = Model.Id }, new { @class = "actionButtons " + @Html.GetColor(Request.Cookies["color"]) })
                    @Html.ActionLink("Edit", "EditReview", "Review", new { id = Model.Id, gameId = Model.Game.Id }, new { @class = "actionButtons " + @Html.GetColor(Request.Cookies["color"]) })
            </div>
        }
    </div>
</div>